﻿using AutoMapper;
using Max.PH4.Shoppgin.Admin.Domain;
using Max.PH4.Shoppgin.Admin.DTO;

namespace Max.PH4.Shoppgin.Admin.API.Config
{
    /// <summary>
    /// AutoMapper的配置
    /// </summary>
    public class AutoMapperConfig : AutoMapper.Profile
    {
        //这个文件的主要作用，就是告诉Automapper这个插件（中间件），哪一个可以映射到哪一个
        public AutoMapperConfig()
        {
            CreateMap<SystemUserEntity, SystemUserOutputDto>();
            CreateMap<SystemUserEntity, SystemUserLoginOutputDto>();
            //CreateMap<SystemUserOutputDto,SystemUserEntity>();

            CreateMap<OrderInputDto, OrderMasterEntity>();
            CreateMap<OrderDetailInputDto, OrderDetailEntity>();
        }
    }
}
